<?php

function fnInsertSeminar($Tema,$DetilTema,$Tempat,$Tanggal,$Waktu,$Status,$TglAwalDaftar,$TglAkhirDaftar) {
    $results = mysql_query("INSERT INTO `mst_seminar` (tema,detil_tema,tempat,tanggal,waktu,status,tgl_awal_daftar,tgl_akhir_daftar)
                            VALUES ('$Tema','$DetilTema','$Tempat','$Tanggal','$Waktu','$Status','$TglAwalDaftar','$TglAkhirDaftar')" );
    return $results;
}
    
function fnUpdateSeminar($Tema,$DetilTema,$Tempat,$Tanggal,$Waktu,$Status,$SeminarId,$TglAwalDaftar,$TglAkhirDaftar) {
    $results = mysql_query("UPDATE `mst_seminar` 
                            SET `tema` = '$Tema', 
                                `detil_tema` = '$DetilTema', 
                                `tempat` = '$Tempat', 
                                `tanggal` = '$Tanggal', 
                                `waktu` = '$Waktu', 
                                `status` = '$Status'
                                , `tgl_awal_daftar` = '$TglAwalDaftar'
                                , `tgl_akhir_daftar` = '$TglAkhirDaftar'
                            WHERE `seminar_id` = '$SeminarId'");
    return $results;
}
    
function fnDeleteSeminar($SeminarId) {
    $results = mysql_query("DELETE FROM `mst_seminar` WHERE `seminar_id` = '$SeminarId'");
    return $results;
}

function fnSelectSeminar($TopikId) {
    $results = mysql_query("SELECT * FROM mst_seminar WHERE seminar_id='".$TopikId."'");
    return $results;
}

function fnSelectAllSeminar() {
    $results = mysql_query("SELECT * FROM mst_seminar");
    return $results;
}

function fnInfoSeminarAktif() {
    $results = mysql_query("SELECT * FROM mst_seminar WHERE status = 1");
    return $results;
}

?>
